<?php

class SkillFamily extends Frank implements iFrank {

    //Properties
    private $displayOrder;
    private $groupId;

    //Getters
    public function groupId() {
        return $this->groupId;
    }

    public function __construct($id = -1, $name = null, $displayOrder = -1, $groupId = -1) {
        $this->id = $id;
        $this->name = $name;
        $this->displayOrder = $displayOrder;
        $this->groupId = $groupId;
    }

    public static function getObject($row) {
        return new SkillFamily($row["family_id"], $row["family_name"], $row["family_display_order"], $row["group_id"]);
    }

    public static function getAll($toArray = false, $fields = null, $query = null, $db = null) {
        $query = 'select * from `' . SKILL_FAMILY_TABLE . '` order by family_display_order asc';
        return parent::getAll($toArray, $fields, $query, $db);
    }

    public static function getById($id, $toArray = false, $fields = null, $query = null, $db = null) {
        $query = 'select * from `' . SKILL_FAMILY_TABLE . '` where family_id = ' . $id;
        return parent::getById($id, $toArray, $fields, $query, $db);
    }

}

?>